package com.dis.service.mapper;

import com.dis.pojo.entity.RolePermission;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface RolePermissionMapper {

    /**
     * 批量新增角色权限关联
     */
    int batchInsert(List<RolePermission> rolePermissions);

    /**
     * 根据角色ID删除关联
     */
    int deleteByRoleId(Long roleId);

    /**
     * 根据权限ID删除关联
     */
    int deleteByPermissionId(Long permissionId);

    /**
     * 根据角色ID查询权限ID列表
     */
    List<Long> selectPermissionIdsByRoleId(Long roleId);
}
